﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="js/esl.js"></script>
</head>
<body>
    <div id="mainMap" style="height: 500px; border: 1px solid #ccc; padding: 10px;"></div>
</body>
</html>
<script>
    require.config({
        paths: {
            echarts: './js/echarts',
            'echarts/chart/bar': './js/echarts-map',
            'echarts/chart/line': './js/echarts-map',
            'echarts/chart/map': './js/echarts-map'
        }
    });

    require(
    [
        'echarts',
        'echarts/chart/bar',
        'echarts/chart/line',
        'echarts/chart/map'
    ],
    function (ec) {
        var myChart2 = ec.init(document.getElementById('mainMap'));
        var index = 10;
        myChart2.setOption({
            timeline: {
                controlPosition: "none",
                data: [
                    '2013-01-01', '2013-02-01', '2013-03-01', '2013-04-01', '2013-05-01',
                    { name: '2013-06-01', symbol: 'emptyStar6', symbolSize: 8 },
                      '2013-07-01', '2013-08-01', '2013-09-01', '2013-10-01', '2013-11-01',
                    { name: '2013-12-01', symbol: 'star6', symbolSize: 8 }
                ],
                label: {
                    formatter: function (s) {
                        return s.slice(0, 7);
                    }
                }
            },
            options: [
                {
                    tooltip: {
                        show: true,
                        formatter: "{a} <br/>{b} : {c} ({d}%)"
                    },
                    legend: {
                        orient: 'vertical',
                        x: 'left',
                        data: ['直达', '营销广告', '搜索引擎', '邮件营销', '联盟广告']
                    },
                    calculable: true,
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            itemStyle: {
                                normal: {
                                    label: {
                                        position: 'inner',
                                        formatter: function (a, b, c, d) { return (d - 0).toFixed(0) + '%' }
                                    },
                                    labelLine: {
                                        show: false
                                    }
                                },
                                emphasis: {
                                    label: {
                                        show: true,
                                        formatter: "{b}\n{d}%"
                                    }
                                }

                            },
                            data: [
                                { value: 300, name: '直达' },
                                { value: 600, name: '营销广告' },
                                { value: 900, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 100, name: '直达' },
                                { value: 200, name: '邮件营销' },
                                { value: 300, name: '联盟广告' },
                                { value: 400, name: '视频广告' },
                                { value: 500, name: '百度', }
                            ]
                        }
                    ]
                },
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 400, name: '直达' },
                                { value: 400, name: '营销广告' },
                                { value: 500, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 500, name: '直达' },
                                { value: 400, name: '邮件营销' },
                                { value: 300, name: '联盟广告' },
                                { value: 200, name: '视频广告' },
                                { value: 100, name: '百度', }
                            ]
                        }
                    ]
                },
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 335, name: '直达' },
                                { value: 69, name: '营销广告' },
                                { value: 18, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 50, name: '直达' },
                                { value: 400, name: '邮件营销' },
                                { value: 30, name: '联盟广告' },
                                { value: 200, name: '视频广告' },
                                { value: 10, name: '百度', }
                            ]
                        }
                    ]
                },
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 33, name: '直达' },
                                { value: 67, name: '营销广告' },
                                { value: 158, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 500, name: '直达' },
                                { value: 40, name: '邮件营销' },
                                { value: 30, name: '联盟广告' },
                                { value: 20, name: '视频广告' },
                                { value: 10, name: '百度', }
                            ]
                        }
                    ]
                },
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 35, name: '直达' },
                                { value: 79, name: '营销广告' },
                                { value: 548, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 35, name: '直达' },
                                { value: 30, name: '邮件营销' },
                                { value: 24, name: '联盟广告' },
                                { value: 15, name: '视频广告' },
                                { value: 480, name: '百度', }
                            ]
                        }
                    ]
                },
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 63357, name: '直达' },
                                { value: 6769, name: '营销广告' },
                                { value: 1586, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 635, name: '直达' },
                                { value: 306, name: '邮件营销' },
                                { value: 264, name: '联盟广告' },
                                { value: 615, name: '视频广告' },
                                { value: 186, name: '百度', }
                            ]
                        }
                    ]
                }
                ,
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 33557, name: '直达' },
                                { value: 6759, name: '营销广告' },
                                { value: 5158, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 535, name: '直达' },
                                { value: 305, name: '邮件营销' },
                                { value: 245, name: '联盟广告' },
                                { value: 515, name: '视频广告' },
                                { value: 158, name: '百度', }
                            ]
                        }
                    ]
                }
                ,
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 43357, name: '直达' },
                                { value: 4679, name: '营销广告' },
                                { value: 4158, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 435, name: '直达' },
                                { value: 430, name: '邮件营销' },
                                { value: 424, name: '联盟广告' },
                                { value: 415, name: '视频广告' },
                                { value: 418, name: '百度', }
                            ]
                        }
                    ]
                }
                ,
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 83357, name: '直达' },
                                { value: 8679, name: '营销广告' },
                                { value: 8158, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 835, name: '直达' },
                                { value: 830, name: '邮件营销' },
                                { value: 824, name: '联盟广告' },
                                { value: 815, name: '视频广告' },
                                { value: 188, name: '百度', }
                            ]
                        }
                    ]
                }
                ,
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 33357, name: '直达' },
                                { value: 3679, name: '营销广告' },
                                { value: 2158, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 535, name: '直达' },
                                { value: 330, name: '邮件营销' },
                                { value: 124, name: '联盟广告' },
                                { value: 2115, name: '视频广告' },
                                { value: 128, name: '百度', }
                            ]
                        }
                    ]
                }
                ,
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 33357, name: '直达' },
                                { value: 6739, name: '营销广告' },
                                { value: 1358, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 355, name: '直达' },
                                { value: 330, name: '邮件营销' },
                                { value: 24, name: '联盟广告' },
                                { value: 135, name: '视频广告' },
                                { value: 184, name: '百度', }
                            ]
                        }
                    ]
                },
                {
                    series: [
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: 80,
                            data: [
                                { value: 3357, name: '直达' },
                                { value: 739, name: '营销广告' },
                                { value: 358, name: '搜索引擎' }
                            ]
                        },
                        {
                            name: '访问来源',
                            type: 'pie',
                            center: ['35%', 200],
                            radius: [110, 140],
                            data: [
                                { value: 55, name: '直达' },
                                { value: 30, name: '邮件营销' },
                                { value: 4, name: '联盟广告' },
                                { value: 35, name: '视频广告' },
                                { value: 184, name: '百度', }
                            ]
                        }
                    ]
                }
            ],

        });
    }
    );
</script>
